<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="../vue.js"></script>
</head>
<body>
  <div id="app">
    <!-- <cpn name="slot-test">
    </cpn>

    <cpn name="全改了">
      <p>新插槽内容</p>
    </cpn> -->

    <cpn name="正常替换">
      <template v-slot:center>
        <p>新插槽内容</p>
      </template>
    </cpn>

      
    <cpn name="缩写语法">
      <template #center>
        <p>新插槽内容</p>
      </template>
    </cpn>

    
  </div>
  <template id="cpn">
    <div>
      <h1>component</h1>
      <p>{{name}}</p>
      <slot name="left"><p>default value 001</p></slot>
      <slot name="center"><p>default value 002</p></slot>
      <slot name="right"><p>default value 003</p></slot>
      <slot>default no name</slot>
    </div>
  </template>


  <template id="cpn-old">
    <div>
      <h1>component</h1>
      <p>{{name}}</p>
      <slot><p>default value 001</p></slot>
      <slot><p>default value 002</p></slot>
      <slot><p>default value 003</p></slot>
    </div>
  </template>
  <script src="./vue.js"></script>
</body>
</html>